import React, { Component } from "react";

import { Provider } from 'react-redux';
import {Router, Scene, Lightbox, Modal, Actions} from 'react-native-router-flux';
import Loading from "../components/modals/Loading";
import {StyleSheet,Text,View,Dimensions} from "react-native"
import configereStore from '../store/configureStore';
const store = configereStore();

// 引入自定义标签烂组件
import TabBarComponent from './tabBarComponent'

// 引入页面
import HomePage from '../pages/home/index.js'
import College from '../pages/college/index.js'
import Dynamic from '../pages/dynamic/index.js'
import My from '../pages/my/index.js'
import Login from '../pages/login/index'
import OrderManager from "../pages/home/OrderManager";
import CommodityManager from "../pages/home/CommodityManager";
import MyWallet from "../pages/home/MyWallet";
import ExtensionHelper from "../pages/home/ExtensionHelper";
import PerchaseHelper from "../pages/home/PerchaseHelper";
import LockHelper from "../pages/home/LockHelper";
import ManagementData from "../pages/home/ManagementData";
import EvaluateManager from "../pages/home/EvaluateManager";
import CommonProblem from "../pages/college/CommonProblem";
import MarketCourse from "../pages/college/MarketCourse";
import NewTrain from "../pages/college/NewTrain";
import SystemTrain from "../pages/college/SystemTrain";
import LatestInformation from "../pages/dynamic/LatestInformation";
import SystemNotification from "../pages/dynamic/SystemNotification";
import AboutUs from "../pages/my/AboutUs";
import AccountSecurity from "../pages/my/AccountSecurity";
import CustomerService from "../pages/my/CustomerService";
import HelpFeedback from "../pages/my/HelpFeedback";
import NotificationPrompt from "../pages/my/NotificationPrompt";
import Partner from "../pages/my/Partner";
import Printer from "../pages/my/Printer";
import RuleCenter from "../pages/my/RuleCenter";
import StoreInformation from "../pages/my/StoreInformation";
import ForgetPwd from "../pages/login/ForgetPwd";
import OpenShop from "../pages/login/OpenShop";
import Test from "../pages/_test/Test";
import DataAudit from "../pages/login/openShop/DataAudit";
import OpenProtocol from "../pages/login/openShop/OpenProtocol";
import AlertModal from "../components/modals/AlertModal";

export default class App extends Component {
    constructor(props) {
        super(props);
    }

    render() {

        return (
            <Provider store={store} >
                <Router>
                        <Lightbox  >
                            <Scene hideNavBar={true} key="root">
                                <Scene  key="tabbar" name="tabbar" tabBarComponent={TabBarComponent} tabBarPosition='bottom' tabs={true}  initial={true}>
                                    <Scene  key="HomePage" Image='home' component={HomePage} hideNavBar={true} />
                                    <Scene  hideNavBar key="College"   Image='home' component={College}  />

                                    <Scene hideNavBar key="Dynamic" Image='home' component={Dynamic}  />
                                    <Scene hideNavBar key="My" Image='home' component={My}  />
                                </Scene>

                                {/*登录 我要开店*/}
                                <Scene key="login" hideNavBar={true}  component={Login} />
                                <Scene key="ForgetPwd" hideNavBar={true}  component={ForgetPwd} />
                                <Scene key="OpenShop" hideNavBar={true}  component={OpenShop} />
                                <Scene key="DataAudit" hideNavBar={true}  component={DataAudit} />
                                <Scene key="OpenProtocol" hideNavBar={true}  component={OpenProtocol} />

                                {/*首页*/}
                                <Scene key="OrderManager"      hideNavBar={true} component={OrderManager}  />
                                <Scene key="CommodityManager"     hideNavBar={true}  component={CommodityManager}    />
                                <Scene key="EvaluateManager"     hideNavBar={true}  component={EvaluateManager}   />
                                <Scene key="MyWallet" hideNavBar={true}  component={MyWallet}   />
                                <Scene key="ExtensionHelper" hideNavBar={true}   component={ExtensionHelper}   />
                                <Scene key="PerchaseHelper" hideNavBar={true} component={PerchaseHelper}   />
                                <Scene key="LockHelper" hideNavBar={true} component={LockHelper}   />
                                <Scene key="ManagementData"  hideNavBar={true} component={ManagementData}   />
                                {/*商学院*/}
                                <Scene key="CommonProblem" hideNavBar={true}  component={CommonProblem}  />
                                <Scene key="NewTrain" hideNavBar={true}  component={NewTrain}  />
                                <Scene key="MarketCourse" hideNavBar={true}  component={MarketCourse}  />
                                <Scene key="SystemTrain" hideNavBar={true}  component={SystemTrain}  />
                                {/*美品动态*/}
                                <Scene key="LatestInformation" hideNavBar={true}  component={LatestInformation}  />
                                <Scene key="SystemNotification" hideNavBar={true}  component={SystemNotification}  />
                                {/*我的*/}
                                <Scene key="AboutUs" hideNavBar={true}  component={AboutUs}  />
                                <Scene key="AccountSecurity" hideNavBar={true}  component={AccountSecurity}  />
                                <Scene key="CustomerService" component={CustomerService}
                                       hideNavBar={true} back={true}     />
                                <Scene key="HelpFeedback" hideNavBar={true}  component={HelpFeedback}  />
                                <Scene key="NotificationPrompt" hideNavBar={true}  component={NotificationPrompt}  />
                                <Scene key="Partner" hideNavBar={true}  component={Partner}  />
                                <Scene key="Printer" hideNavBar={true}  component={Printer}  />
                                <Scene key="RuleCenter" hideNavBar={true}  component={RuleCenter}  />
                                <Scene key="StoreInformation" hideNavBar={true}  component={StoreInformation}  />
                                <Scene key="_test" hideNavBar={true}  component={Test}  />

                            </Scene>
                            <Scene  hideNavBar={true}  key="loading" component={Loading}/>
                            <Scene  hideNavBar={true}  key="alert" component={AlertModal}/>
                        </Lightbox>
                </Router>
            </Provider>
        );

    }

}


